/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrgs.jsopa;

/**
 * Console is an intelligent terminal that reads an entire command line and then
 * generates an interrupt. It should provide a method for the kernel to read the
 * command line, and make sure no other line is being typed in this while.
 */
class Console extends Thread {

    private IntController intCn;

    public Console(IntController i) {
        intCn = i;
    }

    @Override
    public void run() {
        while (Main.isSystemOn()) {
            try {
                sleep(Main.SLEEP_TIME * 40);// was 2 seconds
            } catch (InterruptedException e) {
            }
            Main.print("console");
        }
        Main.print("Console closing");
    }
}
